package com.fr.report.core.cal;

class Rect
{
  int left;
  int top;
  int right;
  int bottom;

  protected Rect(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    this.left = paramInt1;
    this.top = paramInt2;
    this.right = paramInt3;
    this.bottom = paramInt4;
  }

  protected void union(Rect paramRect)
  {
    if (paramRect == null)
      return;
    this.left = Math.min(this.left, paramRect.left);
    this.top = Math.min(this.top, paramRect.top);
    this.right = Math.max(this.right, paramRect.right);
    this.bottom = Math.max(this.bottom, paramRect.bottom);
  }

  public String toString()
  {
    return "{[" + this.left + "→" + this.right + "],[" + this.top + "↓" + this.bottom + "]}";
  }
}